// EditColor.cpp : implementation file
//

#include "stdafx.h"
#include "test.h"
#include "EditColor.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CEditColor

CEditColor::CEditColor()
{
}

CEditColor::~CEditColor()
{
}


BEGIN_MESSAGE_MAP(CEditColor, CStatic)
	//{{AFX_MSG_MAP(CEditColor)
	ON_WM_ERASEBKGND()
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEditColor message handlers

BOOL CEditColor::OnEraseBkgnd(CDC* pDC) 
{
	return TRUE;
}

void CEditColor::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	CRect rect;
	GetClientRect(rect);
	CBrush brush;
	brush.CreateSolidBrush(m_color);
	dc.FillRect(rect,&brush);
	// Do not call CStatic::OnPaint() for painting messages
}
